LanguageChanger = class()

function LanguageChanger:init()
    self.showing = false
    self.nx = 0
    self.back = STButton(60,HEIGHT - 50,LP.back,"Project:RB","Project:B")
    self.back.width = 100
    self.back.height = 60
    self.back.color = color(255, 255, 255, 255)
    self.back.pressedColor = color(136, 135, 135, 255)
    self.back.clicked = function() 
            tween(0.5,self,{nx = 0},tween.easing.cubicOut,function() self.showing = false
            saveSetting()
        end)
    end
end

function LanguageChanger:show()
    self.showing = true
    self.nx = 0
    tween(0.5,self,{nx = WIDTH},tween.easing.cubicOut)
end

function LanguageChanger:draw()
    pushMatrix()
    pushStyle()
    textMode(CENTER)
    translate(self.nx - WIDTH,0)
    noStroke()
    self.back:draw()
    fill(255, 255, 255, 255)
    fontSize(100)
    font("SourceSansPro-Light")
    text("Comming soon",WIDTH/2,HEIGHT/2)   
    popStyle()
    popMatrix()
end

function LanguageChanger:touched(touch)
    self.back:touched(touch)
end
